import type { FC, ReactNode } from 'react'

const Text: FC<{
  children?: ReactNode
  style?: React.CSSProperties
  className?: string
  key?: React.Key
  dangerouslySetInnerHTML?: Record<'__html', string>
}> = ({ children, style, dangerouslySetInnerHTML, className }) => {
  if (dangerouslySetInnerHTML) {
    return (
      <div
        className={className}
        data-type="inline"
        style={style}
        dangerouslySetInnerHTML={dangerouslySetInnerHTML}
      ></div>
    )
  }
  return (
    <div className={className} data-type="inline" style={style}>
      {children}
    </div>
  )
}
export default Text
